package com.zcp.mvpdemo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

import com.zcp.mvpdemo.interfaces.LoginInterface;
import com.zcp.mvpdemo.presenter.LoginPresenter;

public class MainActivity extends AppCompatActivity implements LoginInterface {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        LoginPresenter presenter = new LoginPresenter();
        presenter.setBaseInterface(this);
        presenter.getData("zcp", "12367");
    }

    @Override
    public void nameSuccess() {
        Toast.makeText(MainActivity.this, "成功", Toast.LENGTH_SHORT).show();
    }

    @Override
    public void nameFail() {
        Toast.makeText(MainActivity.this, "失败", Toast.LENGTH_SHORT).show();
    }

    @Override
    public void pwdNotNull() {

    }
}
